import tkinter as tk import pyperclip root=tk.Tk() root.resizable(False, False) root.geometry('800x450+350+100') root.title("进制转换 制作人:澪") entry = tk.Entry(root,width=20) entry.place(x=0,y=35,anchor='nw') entry1 = tk.Entry(root,width=20) entry1.place(x=200,y=35,anchor='nw') entry2 = tk.Entry(root,width=20) entry2.place(x=400,y=35,anchor='nw') entry3 = tk.Entry(root,width=20) entry3.place(x=600,y=35,anchor='nw') def erjinzhi():#2进制 vr=entry.get() vr=(vr) a=oct(int(vr,2))#8 d="八进制为:" a=str(a) a=d+a tk.Label(root, text=a).place(x=0,y=65,anchor='nw') b=int(vr,2)#10 e="十进制为:" b=str(b) b=e+b tk.Label(root, text=b).place(x=0,y=95,anchor='nw') …………
只展示部分代码,如有需要请下载